import { NgModule, Optional, SkipSelf } from "@angular/core";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { AppRoutingModule } from "../app-routing.module";
import { ShareModule } from "../share/share.module";
import { AppStoreModule } from "../store";

@NgModule({
  declarations: [],
  imports: [
    AppRoutingModule,
    ShareModule,
    AppStoreModule,
    BrowserAnimationsModule
  ],
  exports: [AppRoutingModule, ShareModule, AppStoreModule]
})
export class CoreModule {
  constructor(@SkipSelf() @Optional() private parentModule: CoreModule) {
    if (parentModule) {
      throw Error("Core模块被重复导入");
    }
  }
}
